package com.smartjobs.model;

import com.smartjobs.util.DBManager;

public class CreateProfileModel {

	String name;
	String password;
	String emailID;
	int mobileNumber;
	String dob;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmailID() {
		return emailID;
	}

	public void setEmailID(String emailID) {
		this.emailID = emailID;
	}

	public int getMobileNumber() {
		return mobileNumber;
	}

	public void setMobileNumber(int mobileNumber) {
		this.mobileNumber = mobileNumber;
	}

	public String getDob() {
		return dob;
	}

	public void setDob(String dob) {
		this.dob = dob;
	}

	public boolean insertIntoDB(CreateProfileModel profile) {
		String query = "insert into jobseeker (emailId,passwd,name,dob,mobileNumber) values ('"
				+ profile.emailID
				+ "','"
				+ profile.password
				+ "','"
				+ profile.name
				+ "','"
				+ profile.dob
				+ "',"
				+ profile.mobileNumber + ")";

		boolean result = DBManager.insertIntoDB(query);

		if (result)
			return true;
		else
			return false;

	}
}
